#!/usr/bin/python
# -*- coding: utf-8 -*-
# File: testenv.py
# Author: Tomás Vírseda
# License: GPL v3
# Description:  initial wizard to setup environment


class TestVazaarEnvironment():
    result = True
    
    def __init__(self):
        error_imports = ""

        # Core imports
        try:
            import sys
        except Exception, error:
            error_imports += "Check your python installation\n"
            
        # RDFlib imports
        try:
            import rdflib
            print "RDFlib version: %s" %  rdflib.__version__
        except Exception, error:
            error_imports += "please, install rdflib library (python-rdflib in debian/ubuntu)"

        # GUI imports
        try:
            import gtk
            import gobject
            import gtk.glade
            print "Python + GTK: Ok"
        except Exception, error:
            error_imports += str(error)
            
        if len(error_imports) != 0:
            print "Check this: \n\n%s" % error_imports
            self.result = False

    def status(self):
        return self.result

if __name__ == '__main__':
    test = TestVazaarEnvironment()
    print "Vazaar environment test: %s" % test.status()
